package com.mapper;

import com.pojo.List_db;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ListMapper_db {

    List<List_db> list(@Param("name") String name,@Param("id") Integer id);

    @Select("select * from list_db")
    List<List_db> listAll();

    @Select("select * from list_db where b_kid = #{id}")
    List<List_db> listById(Integer id);

    @Insert("insert into list_db(b_no,b_name,b_time,b_kid) values (#{bNo},#{bName},#{bTime},#{bKid})")
    Integer add(List_db listDb);

    @Update("update list_db set b_no = #{bNo},b_name = #{bName},b_time = #{bTime},b_kid = #{bKid} where b_id = #{bId}")
    Integer update(List_db listDb);

    @Delete("delete from list_db where b_id =#{bId}")
    Integer del(Integer bId);
}
